﻿//11.	制造年份检验结论
var xData_109 = function() {
    var data = ["1994","1995","1996","1998","1999","2000","2001","2002","2003","2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014"];
    return data;
}();
//1级
var _data_109_1 =[30, 55, 46, 40, 70, 94, 118, 181, 253, 318, 540, 517, 503, 459, 417, 155, 72, 37, 0, 0]
//2级
var _data_109_2 =[239, 230, 281, 382, 324, 341, 340, 784, 1157, 1995, 2003, 1711, 1365, 1252, 1323, 759, 394, 149, 13, 4]
var   _data_109_3 = [538, 604, 584, 363, 431, 658, 745, 672, 1297, 1051, 926, 986, 990, 692, 621, 368, 183, 42, 1, 0]
var    _data_109_4 = [12, 18, 19, 13, 3, 4, 16, 32, 25, 12, 24, 26, 15, 13, 5, 5, 1, 3, 0, 0]
var   _data_109_5 = [0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0]
var   _data_109_6 = [2, 3, 0, 0, 6, 0, 0, 1, 7, 7, 7, 3, 4, 11, 9, 9, 11, 11, 1, 1]
var  _data_109_7 = [425, 621, 707, 537, 655, 874, 994, 829, 1374, 1654, 2157, 2257, 2180, 2846, 2593, 3274, 3368, 1805, 920, 453]
var   _data_109_8=  [22, 16, 16, 12, 26, 21, 28, 12, 12, 70, 53, 29, 44, 34, 32, 81, 36, 29, 0, 1]
var   _data_109_9= [51, 64, 69, 33, 49, 71, 69, 132, 233, 297, 454, 536, 973, 1473, 2420, 6322, 5369, 4075, 2712, 1980]
var    _data_109_10=  [1, 2, 2, 3, 0, 2, 6, 1, 2, 4, 5, 6, 9, 4, 3, 4, 0, 1, 0, 0]
var   _data_109_11=  [0, 0, 0, 0, 0, 0, 8, 0, 1, 2, 1, 3, 1, 1, 2, 0, 1, 0, 0, 0]
var   _data_109_12=[213, 54, 42, 29, 20, 62, 121, 97, 163, 304, 778, 409, 375, 283, 431, 739, 343, 121, 54, 6]
var  _data_109_13= [0, 0, 0, 1, 0, 0, 0, 0, 0, 4, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0]
option109 = {
    // backgroundColor: "#344b58",
    "title": {
        "text": "",
        "subtext": '',
        x: "4%",

        textStyle: {
            color: '#fff',
            fontSize: '22'
        },
        subtextStyle: {
            color: '#90979c',
            fontSize: '16',

        },
    },
    "tooltip": {
        "trigger": "axis",
        "axisPointer": {
            "type": "shadow",
            textStyle: {
                color: "#fff"
            }
        },
        formatter: function(params) {
            // console.log(params)
            var indexX =0;
            for(var x=0;x<xData_109.length;x++){
                if(params[0].name === xData_109[x]){
                    indexX = x;
                    break;
                }
            }
            var sum = _data_109_1[indexX] + _data_109_2[indexX] + _data_109_3[indexX] + _data_109_4[indexX] + _data_109_5[indexX] + _data_109_6[indexX] + _data_109_7[indexX] + _data_109_8[indexX] + _data_109_9[indexX] + _data_109_10[indexX] + _data_109_11[indexX] + _data_109_12[indexX] + _data_109_13[indexX];

            var displayString = '制造年份：' + params[0].name
            for(var m =0;m<params.length;m++){
                var itemString = '<br/>'+ params[m].marker + params[m].seriesName +':数量：' + params[m].data+ '，' + '占比：' + (params[m].data / sum * 100).toFixed(2) + '%，总数:'+sum;
                displayString = displayString + itemString
            }
            return displayString
        }
    },
    "grid": {
        "borderWidth": 0,
        "top": 110,
        "bottom": 95,
        textStyle: {
            color: "#fff"
        }
    },
    "legend": {
        x: '4%',
        top: '5%',
        textStyle: {
            color: '#fff',
            fontSize: '16',
        },
        "data": ['1 级', '2 级', '3 级', '4 级', '5 级', '不合格', '合格', '监督运行', '其他', '停止运行', '修理后复检', '允许使用', '整改后使用']
    },


    "calculable": true,
    "xAxis": [{
        "type": "category",
        "axisLine": {
            lineStyle: {
                color: '#90979c'
            }
        },
        "splitLine": {
            "show": false
        },
        "axisTick": {
            "show": false
        },
        "splitArea": {
            "show": false
        },
        "axisLabel": {
            "interval": 0,
            textStyle: {
                color: '#fff',
                fontSize: '16',
            },
        },
        "data": xData_109,
    }],
    "yAxis": [{
        "type": "value",
        "splitLine": {
            "show": false
        },
        "axisLine": {
            lineStyle: {
                color: '#90979c'
            }
        },
        "axisTick": {
            "show": false
        },
        "axisLabel": {
            "interval": 0,
        textStyle: {
            color: '#fff',
            fontSize: '16',
        },
        },
        "splitArea": {
            "show": false
        },

    }],
    "dataZoom": [{
        "show": true,
        "height": 30,
        "xAxisIndex": [
            0
        ],
        bottom: 30,
        "start": 0,
        "end": 100,
        handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
        handleSize: '110%',
        handleStyle: {
            color: "#d3dee5",

        },
        textStyle: {
            color: "#fff"
        },
        borderColor: "#90979c"


    }, {
        "type": "inside",
        "show": true,
        "height": 15,
        "start": 1,
        "end": 35
    }],
    "series": [
        {
            "name": "1 级",
            "type": "line",
            "stack": "总量",
            symbol: 'circle',
            "itemStyle": {
                "normal": {
                    "color": "#567",
                    "label": {
                        "show": false,
                        "textStyle": {
                            "color": "#fff"
                        },
                        "position": "insideTop",
                        formatter: function(p) {
                            return p.value > 0 ? (p.value) : '';
                        }
                    }
                }
            },
            "data": _data_109_1
        },
        {
            "name": "2 级",
            "type": "line",
            "stack": "总量",
            symbol: 'circle',
            "barMaxWidth": 35,
            "barGap": "10%",
            "itemStyle": {
                "normal": {
                    "color": "rgba(0,191,183,1)",
                    "label": {
                    "show": false,
                        "textStyle": {
                            "color": "#fff"
                        },
                        "position": "insideTop",
                        formatter: function(p) {
                            return p.value > 0 ? (p.value) : '';
                        }
                    }
                }
            },
            "data":_data_109_2
        },
        {
            "name": "3 级",
            "type": "line",
            "stack": "总量",
            symbol: 'circle',
            "itemStyle": {
                "normal": {
                    "color": "rgba(255,193,193,1)",
                    "label": {
                    "show": false,
                        "textStyle": {
                            "color": "#fff"
                        },
                        "position": "insideTop",
                        formatter: function(p) {
                            return p.value > 0 ? (p.value) : '';
                        }
                    }
                }
            },
            "data": _data_109_3
        },
        {
            "name": "4 级",
            "type": "line",
            "stack": "总量",
            symbol: 'circle',
            "itemStyle": {
                "normal": {
                    "color": "rgba(186,85,211,1)",
                    "label": {
                        "show": false,
                        "textStyle": {
                            "color": "#fff"
                        },
                        "position": "insideTop",
                        formatter: function(p) {
                            return p.value > 0 ? (p.value) : '';
                        }
                    }
                }
            },
            "data":  _data_109_4
        },
        {
            "name": "5 级",
            "type": "line",
            "stack": "总量",
            symbol: 'circle',
            "itemStyle": {
                "normal": {
                    "color": "rgba(255,193,193,1)",
                    "label": {
                        "show": false,
                        "textStyle": {
                            "color": "#fff"
                        },
                        "position": "insideTop",
                        formatter: function(p) {
                            return p.value > 0 ? (p.value) : '';
                        }
                    }
                }
            },
            "data":_data_109_5
        },
        {
            "name": "不合格",
            "type": "line",
            "stack": "总量",
            // symbolSize: 10,
            symbol: 'circle',
            "itemStyle": {
                "normal": {
                    "color": "rgba(252,230,48,1)",
                    "barBorderRadius": 0,
                    "label": {
                        "show": false,
                        "position": "top",
                        formatter: function(p) {
                            return p.value > 0 ? (p.value) : '';
                        }
                    }
                }
            },
            "data": _data_109_6
        },
        {
            "name": "合格",
            "type": "line",
            "stack": "总量",
            symbol: 'circle',
            "barMaxWidth": 35,
            "barGap": "10%",
            "itemStyle": {
                "normal": {
                    "color": "rgba(255,185,15,1)",
                    "label": {
                        "show": false,
                        "textStyle": {
                            "color": "#fff"
                        },
                        "position": "insideTop",
                        formatter: function(p) {
                            return p.value > 0 ? (p.value) : '';
                        }
                    }
                }
            },
            "data": _data_109_7
        },
        {
            "name": "监督运行",
            "type": "line",
            "stack": "总量",
            // symbolSize: 10,
            symbol: 'circle',
            "itemStyle": {
                "normal": {
                    "color": "#F88",
                    "barBorderRadius": 0,
                    "label": {
                        "show": false,
                        "position": "top",
                        formatter: function(p) {
                            return p.value > 0 ? (p.value) : '';
                        }
                    }
                }
            },
            "data":_data_109_8
        },
        {
            "name": "其他",
            "type": "line",
            "stack": "总量",
            symbol: 'circle',
            "barMaxWidth": 35,
            "barGap": "10%",
            "itemStyle": {
                "normal": {
                    "color": "rgba(255,144,128,1)",
                    "label": {
                        "show": false,
                        "textStyle": {
                            "color": "#fff"
                        },
                        "position": "insideTop",
                        formatter: function(p) {
                            return p.value > 0 ? (p.value) : '';
                        }
                    }
                }
            },
            "data":_data_109_9
        },
        {
            "name": "停止运行",
            "type": "line",
            "stack": "总量",
            // symbolSize: 10,
            symbol: 'circle',
            "itemStyle": {
                "normal": {
                    "color": "#900",
                    "barBorderRadius": 0,
                    "label": {
                        "show": false,
                        "position": "top",
                        formatter: function(p) {
                            return p.value > 0 ? (p.value) : '';
                        }
                    }
                }
            },
            "data":_data_109_10
        },
        {
            "name": "修理后复检",
            "type": "line",
            "stack": "总量",
            // symbolSize: 10,
            symbol: 'circle',
            "itemStyle": {
                "normal": {
                    "color": "#190",
                    "barBorderRadius": 0,
                    "label": {
                        "show": false,
                        "position": "top",
                        formatter: function(p) {
                            return p.value > 0 ? (p.value) : '';
                        }
                    }
                }
            },
            "data":_data_109_11
        },
        {
            "name": "允许使用",
            "type": "line",
            "stack": "总量",
            symbol: 'circle',
            "itemStyle": {
                "normal": {
                    "color": "#099",
                    "label": {
                    "show": false,
                        "textStyle": {
                            "color": "#fff"
                        },
                        "position": "insideTop",
                        formatter: function(p) {
                            return p.value > 0 ? (p.value) : '';
                        }
                    }
                }
            },
            "data": _data_109_12
        },

        {
            "name": "整改后使用",
            "type": "line",
            "stack": "总量",
            // symbolSize: 10,
            symbol: 'circle',
            "itemStyle": {
                "normal": {
                    "color": "#777",
                    "barBorderRadius": 0,
                    "label": {
                        "show": false,
                        "position": "top",
                        formatter: function(p) {
                            return p.value > 0 ? (p.value) : '';
                        }
                    }
                }
            },
            "data": _data_109_13
        },

    ]
}
